package com.googlecode.perfectable.persistable.serialization;

import java.util.Collection;

import com.google.common.collect.ImmutableSet;

public class ClassBasedSeparator implements Separator {

	private final Collection<Class<?>> managedClasses;

	public ClassBasedSeparator(Class<?>... managedClasses) {
		this.managedClasses = ImmutableSet.copyOf(managedClasses);
	}

	@Override
	public boolean isSeparate(Object obj) {
		return this.managedClasses.contains(obj.getClass());
	}

}
